package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;

/**
 * 零距离
 */
public class LingJuLiUtil {


    public static Integer getSocialInsurance(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shebao.sb001.getValue(), shebao)) {
            return 2;
        }
        return 1;
    }

    public static Integer getjob(String shebao) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz002.getValue(), shebao)) {
            return 1;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Gongzuo.gz004.getValue(), shebao)) {
            return 3;
        }
        return 0;
    }


    public static Integer getxueli(String xueli) {
        if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl001.getValue(), xueli)) {
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl002.getValue(), xueli)) {
            return 1;
        }else if (StrUtil.equals(BaseTypeInfoEnum.XueLi.xl003.getValue(), xueli)) {
            return 2;
        }
        return 3;
    }
    public static Integer getYuqi(String yuqi) {
        if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq001.getValue(), yuqi)) {
            return 2;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Yuqi.yq002.getValue(), yuqi)) {
            return 4;
        }
        return 3;
    }


    public static Integer getGjj(String gongjijin) {
        if (StrUtil.equals(BaseTypeInfoEnum.Gjj.gjj001.getValue(), gongjijin)) {
            return 2;
        }
        return 1;
    }

    public static Integer getloanTime(String loantime) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt001.getValue(), loantime)) {
            return 1;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt002.getValue(), loantime)) {
            return 2;
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanTime.lt003.getValue(), loantime)) {
            return 4;
        }
        return 5;
    }

    public static String getloan(String loan) {
        if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la001.getValue(), loan)) {
            return "10000";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la002.getValue(), loan)) {
            return "30000";
        } else if (StrUtil.equals(BaseTypeInfoEnum.LoanAmount.la003.getValue(), loan)) {
            return "50000";
        }
        return "100000";
    }


    public static Integer getCar(String car) {
        if (StrUtil.equals(BaseTypeInfoEnum.Car.car001.getValue(), car)) {
            return 2;
        }
        return 1;
    }


    public static Integer getHouse(String house) {
        if (StrUtil.equals(BaseTypeInfoEnum.House.hu001.getValue(), house)) {
            return 2;
        }
        return 1;
    }


    public static String getshouru(String shouru) {
        if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr001.getValue(), shouru)) {
            return "4500";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr002.getValue(), shouru)) {
            return "8000";
        } else if (StrUtil.equals(BaseTypeInfoEnum.Shouru.sr003.getValue(), shouru)) {
            return "15000";
        }
        return "25000";
    }


    public static Integer getbaodan(String baodan) {
        if (StrUtil.equals(BaseTypeInfoEnum.Baoxian.bx001.getValue(), baodan)) {
            return 2;
        }
        return 1;
    }

    public static Integer getxyk(String xyk) {
        if (StrUtil.equals(BaseTypeInfoEnum.XinYongKa.xyk001.getValue(), xyk)) {
            return 0;
        }
        return 1;
    }


    public static Integer getZhimaScore(String zhima) {
        if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm005.getValue(), zhima)) {
            return 4;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm004.getValue(), zhima)) {
            return 3;
        } else if (StrUtil.equals(BaseTypeInfoEnum.Zhima.zm003.getValue(), zhima)) {
            return 2;
        }
        return 1;
    }

}
